import request from '@/utils/request';
import axios from 'axios'
import env from "@/utils/env"
export const studentDeatil = (id) => request.post("/homework/zhty/stu/stu-info-detail", { stuId: id }) //学生信息
export const studentList = (data) => request.post("/homework/zhty/stu/class-stu-list", {
  ...data
})//学生列表

export const studentAddasEdit = (data) => request.post("/homework/zhty/stu/save-stu-info", data); // 学生添加修改接口
export const studentDoFirst = (data) => request.post("/homework/zhty/stu/stu-without-task-info", data);//学生免做
export const studentImport = (data) => request.post("/homework/zhty/stu/import-stu-list", data) //学生导入
import { exportFileNoName } from '@/utils/export'
import encryption from '@/utils/encryption'
// 下载学生信息
export const exportExcelFun = (data, token) => {
  axios.post(env.BASEURL+"/homework/zhty/stu/export-stu-list", {param:encryption(JSON.stringify(data))}, {
    headers: {
      "access-token": token,
      "Content-Type": "application/json;charset=UTF-8"
    },

    responseType: 'blob',
  }).then(response => {
    exportFileNoName(response)
  })
}
//下载模板

export const downLoadTempalteApi = (data) => request.post("/homework/zhty/stu/download-stu-Model", data) //学生导入
//删除教师
export const delStuInfo = (data) =>request.post("/homework/zhty/stu/del-stu-info",data)
